/**
 * Created by Administrator on 2018/6/25 0025.
 */
    //获取当前网址，如： http://localhost:80/ybzx/index.jsp
var curPath = window.document.location.href;
//获取主机地址之后的目录，如： ybzx/index.jsp
var pathName = window.document.location.pathname;
//获取带"/"的项目名，如：/ybzx
var path = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);